import http from '../index';

export const getAll = () => http({
    url: '/api/regions',
    method: 'get'
})

export const addData = (data) => http({
    url: '/api/regions',
    method: 'post',
    data
})

export const editData = (data) => http({
    url: '/api/regions',
    method: 'put',
    data
})

export const delData = (data) => http({
    url: '/api/regions/' + data,
    method: 'delete',
    data
})

export const getDataByName = (data) => http({
    url: '/api/regions/name?name=' + data,
    method: 'get',
    data
})

export const updateExcel = (data) => http({
    url: '/api/regions/uploadregion',
    method: 'post',
    data
})